import React from "react"
import { Route, Switch, Redirect } from "react-router-dom"

import Home from "./pages/Home"
import PostList from "./pages/PostList"
import PostDetail from "./pages/PostDetail"

export default function() {
  return (
    <Switch>
      <Route path="/home" component={Home} />
      <Route path="/post-list" component={PostList} />
      <Route path="/post-detail/:id" component={PostDetail} />

      <Redirect path="/" to="/home" />
    </Switch>
  )
}
